package com.example.endusation.controller;

import com.example.endusation.dto.UserInfoDTO;
import com.example.endusation.service.CourseService;
import com.example.endusation.util.WrapperResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/core/web/course")
public class CourseController {
    @Autowired
    private CourseService courseService;
    @PostMapping("/getCourse")
    public WrapperResponse getCourse( @RequestBody UserInfoDTO userInfoDTO){
        return courseService.getCourse(userInfoDTO);
    }
    @PostMapping("/getCourseDetil")
    public WrapperResponse getCourseDetil(@RequestBody String courseId){
        return  courseService.getCourseDetil(courseId);
    }
}
